<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Math对象</title>
</head>
<body>
<script>
    var num=3.14,num2=3.109;
    var result1 = Math.round(num);
    console.log(result1);
    var result2 = Math.floor(num);
    console.log(result2);
    var result3 = Math.ceil(num);
    console.log(result3);
    var result4 = Math.abs(-100);
    console.log("result4="+result4)
    var pi = Math.PI;
    console.log(pi);
    var max = Math.max(num,num2);
    console.log("max="+max);
    var min = Math.min(num,num2);
    console.log("min="+min);
    var result5 = Math.pow(2,2);
    console.log(result5);
    var randomNum = Math.random();
    console.log("randomNum="+randomNum);
</script>
</body>
</html>